package com.huwaiwai.spring.myioc;

import java.lang.reflect.InvocationTargetException;

/**
 * Created by hww on 2018/7/29 下午3:44.
 */
public class Test {

    public static void main(String [] args) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {

        Test t = new Test();
        Weather w = (Weather) t.springDo();
        w.weather();
    }

    private Object springDo() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        WeatherList wl = new WeatherList(); // 启动的时候就需要加载的
        Weather w = new Weather();       //扫描类注解后new操作然后进行下一步
        wl.get(w);                    // 将其类里面的变量进行new操作并放入容器
        return wl.returnList().get(0);
    }
}
